class AddQuestionTextFields < ActiveRecord::Migration
  def self.up
    remove_column :questions, :by_country
    remove_column :questions, :by_cross_border
    
    add_column :question_texts, :by_country, :boolean, :default => false
    add_column :question_texts, :by_cross_border, :boolean, :default => false
    add_column :question_texts, :by_strategy, :boolean, :default => false
    
    add_column :question_texts, :autofill_country, :boolean, :default => false
    add_column :question_texts, :autofill_cross_border, :boolean, :default => false
    add_column :question_texts, :autofill_strategy, :boolean, :default => false
    
    add_column :question_texts, :visible, :boolean, :default => true
  end

  def self.down
    add_column :questions, :by_country, :boolean
    add_column :questions, :by_cross_border, :boolean
    
    remove_column :question_texts, :by_country
    remove_column :question_texts, :by_cross_border
    remove_column :question_texts, :by_strategy
    
    remove_column :question_texts, :autofill_country
    remove_column :question_texts, :autofill_cross_border
    remove_column :question_texts, :autofill_strategy
    
    remove_column :question_texts, :visible
  end
end
